.class public Lcom/hyphenate/chat/adapter/EMAChatClient;
.super Lcom/hyphenate/chat/adapter/EMABase;


# instance fields
.field private callManager:Lcom/hyphenate/chat/adapter/EMACallManager;

.field private chatManager:Lcom/hyphenate/chat/adapter/EMAChatManager;

.field private chatRoomManager:Lcom/hyphenate/chat/adapter/EMAChatRoomManager;

.field private contactManager:Lcom/hyphenate/chat/adapter/EMAContactManager;

.field private groupManager:Lcom/hyphenate/chat/adapter/EMAGroupManager;


# direct methods
.method public constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Lcom/hyphenate/chat/adapter/EMABase;-><init>()V

    iput-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->chatManager:Lcom/hyphenate/chat/adapter/EMAChatManager;

    iput-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->chatRoomManager:Lcom/hyphenate/chat/adapter/EMAChatRoomManager;

    iput-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->callManager:Lcom/hyphenate/chat/adapter/EMACallManager;

    iput-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->groupManager:Lcom/hyphenate/chat/adapter/EMAGroupManager;

    iput-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->contactManager:Lcom/hyphenate/chat/adapter/EMAContactManager;

    return-void
.end method

.method public static create(Lcom/hyphenate/chat/adapter/EMAChatConfig;)Lcom/hyphenate/chat/adapter/EMAChatClient;
    .locals 4

    new-instance v0, Lcom/hyphenate/chat/adapter/EMAChatClient;

    invoke-direct {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;-><init>()V

    invoke-static {p0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_create(Lcom/hyphenate/chat/adapter/EMAChatConfig;)J

    move-result-wide v2

    iput-wide v2, v0, Lcom/hyphenate/chat/adapter/EMAChatClient;->nativeHandler:J

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getChatManager()Lcom/hyphenate/chat/adapter/EMAChatManager;

    move-result-object v1

    if-nez v1, :cond_0

    new-instance v1, Lcom/hyphenate/chat/adapter/EMAChatManager;

    invoke-direct {v1}, Lcom/hyphenate/chat/adapter/EMAChatManager;-><init>()V

    iput-object v1, v0, Lcom/hyphenate/chat/adapter/EMAChatClient;->chatManager:Lcom/hyphenate/chat/adapter/EMAChatManager;

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getChatManager()Lcom/hyphenate/chat/adapter/EMAChatManager;

    move-result-object v1

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_getChatManager()J

    move-result-wide v2

    iput-wide v2, v1, Lcom/hyphenate/chat/adapter/EMAChatManager;->nativeHandler:J

    :cond_0
    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getChatRoomManager()Lcom/hyphenate/chat/adapter/EMAChatRoomManager;

    move-result-object v1

    if-nez v1, :cond_1

    new-instance v1, Lcom/hyphenate/chat/adapter/EMAChatRoomManager;

    invoke-direct {v1}, Lcom/hyphenate/chat/adapter/EMAChatRoomManager;-><init>()V

    iput-object v1, v0, Lcom/hyphenate/chat/adapter/EMAChatClient;->chatRoomManager:Lcom/hyphenate/chat/adapter/EMAChatRoomManager;

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getChatRoomManager()Lcom/hyphenate/chat/adapter/EMAChatRoomManager;

    move-result-object v1

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_getChatRoomManager()J

    move-result-wide v2

    iput-wide v2, v1, Lcom/hyphenate/chat/adapter/EMAChatRoomManager;->nativeHandler:J

    :cond_1
    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getCallManager()Lcom/hyphenate/chat/adapter/EMACallManager;

    move-result-object v1

    if-nez v1, :cond_2

    new-instance v1, Lcom/hyphenate/chat/adapter/EMACallManager;

    invoke-direct {v1}, Lcom/hyphenate/chat/adapter/EMACallManager;-><init>()V

    iput-object v1, v0, Lcom/hyphenate/chat/adapter/EMAChatClient;->callManager:Lcom/hyphenate/chat/adapter/EMACallManager;

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getCallManager()Lcom/hyphenate/chat/adapter/EMACallManager;

    move-result-object v1

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_getCallManager()J

    move-result-wide v2

    iput-wide v2, v1, Lcom/hyphenate/chat/adapter/EMACallManager;->nativeHandler:J

    :cond_2
    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getGroupManager()Lcom/hyphenate/chat/adapter/EMAGroupManager;

    move-result-object v1

    if-nez v1, :cond_3

    new-instance v1, Lcom/hyphenate/chat/adapter/EMAGroupManager;

    invoke-direct {v1}, Lcom/hyphenate/chat/adapter/EMAGroupManager;-><init>()V

    iput-object v1, v0, Lcom/hyphenate/chat/adapter/EMAChatClient;->groupManager:Lcom/hyphenate/chat/adapter/EMAGroupManager;

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getGroupManager()Lcom/hyphenate/chat/adapter/EMAGroupManager;

    move-result-object v1

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_getGroupManager()J

    move-result-wide v2

    iput-wide v2, v1, Lcom/hyphenate/chat/adapter/EMAGroupManager;->nativeHandler:J

    :cond_3
    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getContactManager()Lcom/hyphenate/chat/adapter/EMAContactManager;

    move-result-object v1

    if-nez v1, :cond_4

    new-instance v1, Lcom/hyphenate/chat/adapter/EMAContactManager;

    invoke-direct {v1}, Lcom/hyphenate/chat/adapter/EMAContactManager;-><init>()V

    iput-object v1, v0, Lcom/hyphenate/chat/adapter/EMAChatClient;->contactManager:Lcom/hyphenate/chat/adapter/EMAContactManager;

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->getContactManager()Lcom/hyphenate/chat/adapter/EMAContactManager;

    move-result-object v1

    invoke-virtual {v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_getContactManager()J

    move-result-wide v2

    iput-wide v2, v1, Lcom/hyphenate/chat/adapter/EMAContactManager;->nativeHandler:J

    :cond_4
    return-object v0
.end method

.method static native native_create(Lcom/hyphenate/chat/adapter/EMAChatConfig;)J
.end method


# virtual methods
.method public addConnectionListener(Lcom/hyphenate/chat/adapter/EMAConnectionListener;)V
    .locals 0

    invoke-virtual {p0, p1}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_addConnectionListener(Lcom/hyphenate/chat/adapter/EMAConnectionListener;)V

    return-void
.end method

.method public autoLogin(Ljava/lang/String;Ljava/lang/String;Lcom/hyphenate/chat/adapter/EMAError;)V
    .locals 0

    invoke-virtual {p0, p1, p2, p3}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_autoLogin(Ljava/lang/String;Ljava/lang/String;Lcom/hyphenate/chat/adapter/EMAError;)V

    return-void
.end method

.method public changeAppkey(Ljava/lang/String;)Lcom/hyphenate/chat/adapter/EMAError;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_changeAppkey(Ljava/lang/String;)Lcom/hyphenate/chat/adapter/EMAError;

    move-result-object v0

    return-object v0
.end method

.method public createAccount(Ljava/lang/String;Ljava/lang/String;)Lcom/hyphenate/chat/adapter/EMAError;
    .locals 1

    invoke-virtual {p0, p1, p2}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_createAccount(Ljava/lang/String;Ljava/lang/String;)Lcom/hyphenate/chat/adapter/EMAError;

    move-result-object v0

    return-object v0
.end method

.method public disconnect()V
    .locals 0

    invoke-virtual {p0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_disconnect()V

    return-void
.end method

.method public getCallManager()Lcom/hyphenate/chat/adapter/EMACallManager;
    .locals 1

    iget-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->callManager:Lcom/hyphenate/chat/adapter/EMACallManager;

    return-object v0
.end method

.method public getChatManager()Lcom/hyphenate/chat/adapter/EMAChatManager;
    .locals 1

    iget-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->chatManager:Lcom/hyphenate/chat/adapter/EMAChatManager;

    return-object v0
.end method

.method public getChatRoomManager()Lcom/hyphenate/chat/adapter/EMAChatRoomManager;
    .locals 1

    iget-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->chatRoomManager:Lcom/hyphenate/chat/adapter/EMAChatRoomManager;

    return-object v0
.end method

.method public getContactManager()Lcom/hyphenate/chat/adapter/EMAContactManager;
    .locals 1

    iget-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->contactManager:Lcom/hyphenate/chat/adapter/EMAContactManager;

    return-object v0
.end method

.method public getGroupManager()Lcom/hyphenate/chat/adapter/EMAGroupManager;
    .locals 1

    iget-object v0, p0, Lcom/hyphenate/chat/adapter/EMAChatClient;->groupManager:Lcom/hyphenate/chat/adapter/EMAGroupManager;

    return-object v0
.end method

.method public native helloWorld()Ljava/lang/String;
.end method

.method public isConnected()Z
    .locals 1

    invoke-virtual {p0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_isConnected()Z

    move-result v0

    return v0
.end method

.method public login(Ljava/lang/String;Ljava/lang/String;Lcom/hyphenate/chat/adapter/EMAError;)V
    .locals 0

    invoke-virtual {p0, p1, p2, p3}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_login(Ljava/lang/String;Ljava/lang/String;Lcom/hyphenate/chat/adapter/EMAError;)V

    return-void
.end method

.method public logout()V
    .locals 0

    invoke-virtual {p0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_logout()V

    return-void
.end method

.method native native_addConnectionListener(Lcom/hyphenate/chat/adapter/EMAConnectionListener;)V
.end method

.method native native_autoLogin(Ljava/lang/String;Ljava/lang/String;Lcom/hyphenate/chat/adapter/EMAError;)V
.end method

.method native native_changeAppkey(Ljava/lang/String;)Lcom/hyphenate/chat/adapter/EMAError;
.end method

.method native native_createAccount(Ljava/lang/String;Ljava/lang/String;)Lcom/hyphenate/chat/adapter/EMAError;
.end method

.method native native_disconnect()V
.end method

.method native native_getCallManager()J
.end method

.method native native_getChatManager()J
.end method

.method native native_getChatRoomManager()J
.end method

.method native native_getContactManager()J
.end method

.method native native_getGroupManager()J
.end method

.method native native_isConnected()Z
.end method

.method native native_login(Ljava/lang/String;Ljava/lang/String;Lcom/hyphenate/chat/adapter/EMAError;)V
.end method

.method native native_logout()V
.end method

.method native native_onNetworkChanged(I)V
.end method

.method native native_removeConnectionListener(Lcom/hyphenate/chat/adapter/EMAConnectionListener;)V
.end method

.method native native_sendPing(ZJ)Z
.end method

.method native native_setPresence(I)V
.end method

.method native natvie_reconnect()V
.end method

.method public onNetworkChanged(Lcom/hyphenate/chat/adapter/EMAChatClient$EMANetwork;)V
    .locals 1

    invoke-virtual {p1}, Lcom/hyphenate/chat/adapter/EMAChatClient$EMANetwork;->ordinal()I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_onNetworkChanged(I)V

    return-void
.end method

.method public reconnect()V
    .locals 0

    invoke-virtual {p0}, Lcom/hyphenate/chat/adapter/EMAChatClient;->natvie_reconnect()V

    return-void
.end method

.method public removeConnectionListener(Lcom/hyphenate/chat/adapter/EMAConnectionListener;)V
    .locals 0

    invoke-virtual {p0, p1}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_removeConnectionListener(Lcom/hyphenate/chat/adapter/EMAConnectionListener;)V

    return-void
.end method

.method public sendPing(ZJ)Z
    .locals 2

    invoke-virtual {p0, p1, p2, p3}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_sendPing(ZJ)Z

    move-result v0

    return v0
.end method

.method public setPresence(I)V
    .locals 0

    invoke-virtual {p0, p1}, Lcom/hyphenate/chat/adapter/EMAChatClient;->native_setPresence(I)V

    return-void
.end method
